#include "Exceptions.h"
#include <sstream>

namespace BPL
{
Exception::Exception(const std::string& message) :
mpt_message(message)
{

}

Exception::~Exception() throw()
{

}

const char* Exception::what() const throw()
{
    return mpt_message.c_str();
}
}

AssertException::AssertException(const std::string& file, int line, const std::string& message)
{
    std::ostringstream oss;
    oss << message << std::endl << std::endl;
    oss << file << " (" << line << ")";

    mpt_message = oss.str();
}

LoadingFailed::LoadingFailed(const std::string& file, const std::string& message)
{
    std::ostringstream oss;
    oss << "Erreur dans le chargement de " << file << std::endl << std::endl << message;

    mpt_message = oss.str();
}
